{
    "dataset_reader": {
        "class_name": "basic_classification_reader",
        "x": "text",
        "y": "joint_labels",
        "data_path": "{DOWNLOADS_PATH}/midas/",
        "train": "midas_semantic_classes_train.csv",
        "valid": "midas_semantic_classes_dev.csv"
    },
    "dataset_iterator": {
        "class_name": "basic_classification_iterator",
        "seed": 42
    },
    "chainer": {
        "in": [
            "x"
        ],
        "in_y": [
            "y"
        ],
        "pipe": [
            {
                "class_name": "bert_preprocessor",
                "vocab_file": "{DOWNLOADS_PATH}/bert_models/conversational_cased_L-12_H-768_A-12/vocab.txt",
                "do_lower_case": false,
                "max_seq_length": 64,
                "in": [
                    "x"
                ],
                "out": [
                    "bert_features"
                ]
            },
            {
                "id": "classes_vocab",
                "class_name": "simple_vocab",
                "fit_on": [
                    "y"
                ],
                "save_path": "{MODEL_PATH}/classes.dict",
                "load_path": "{MODEL_PATH}/classes.dict",
                "in": [
                    "y"
                ],
                "out": [
                    "y_ids"
                ]
            },
            {
                "in": [
                    "y_ids"
                ],
                "out": [
                    "y_onehot"
                ],
                "class_name": "one_hotter",
                "depth": "#classes_vocab.len",
                "single_vector": true
            },
            {
                "class_name": "bert_classifier",
                "n_classes": "#classes_vocab.len",
                "return_probas": true,
                "multilabel": false,
                "one_hot_labels": true,
                "bert_config_file": "{DOWNLOADS_PATH}/bert_models/conversational_cased_L-12_H-768_A-12/bert_config.json",
                "pretrained_bert": "{DOWNLOADS_PATH}/bert_models/conversational_cased_L-12_H-768_A-12/bert_model.ckpt",
                "save_path": "{MODEL_PATH}/model",
                "load_path": "{MODEL_PATH}/model",
                "keep_prob": 0.5,
                "learning_rate": 1e-05,
                "learning_rate_drop_patience": 5,
                "learning_rate_drop_div": 2.0,
                "in": [
                    "bert_features"
                ],
                "in_y": [
                    "y_onehot"
                ],
                "out": [
                    "y_pred_probas"
                ]
            },
            {
                "in": [
                    "y_pred_probas"
                ],
                "out": [
                    "y_pred_ids"
                ],
                "class_name": "proba2labels",
                "max_proba": true
            },
            {
                "in": [
                    "y_pred_ids"
                ],
                "out": [
                    "y_pred_labels"
                ],
                "ref": "classes_vocab"
            }
        ],
        "out": [
            "y_pred_labels"
        ]
    },
    "train": {
        "epochs": 50,
        "batch_size": 64,
        "metrics": [
            "accuracy",
            "f1_macro",
            "f1_weighted",
            {
                "name": "roc_auc",
                "inputs": [
                    "y_onehot",
                    "y_pred_probas"
                ]
            }
        ],
        "validation_patience": 5,
        "val_every_n_epochs": 1,
        "log_every_n_epochs": 1,
        "show_examples": false,
        "evaluation_targets": [
            "train",
            "valid"
        ],
        "class_name": "nn_trainer",
        "tensorboard_log_dir": "{MODEL_PATH}/"
    },
    "metadata": {
        "imports": [
            "fmeasure"
        ],
        "variables": {
            "ROOT_PATH": "~/.deeppavlov",
            "DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
            "MODELS_PATH": "{ROOT_PATH}/models",
            "MODEL_PATH": "{MODELS_PATH}/classifiers/midas_conv_bert_v2"
        },
        "requirements": [
            "{DEEPPAVLOV_PATH}/requirements/tf.txt",
            "{DEEPPAVLOV_PATH}/requirements/bert_dp.txt"
        ],
        "download": [
            {
                "url": "http://files.deeppavlov.ai/alexaprize_data/midas_conv_bert_v1.tar.gz",
                "subdir": "{MODELS_PATH}/classifiers"
            }
        ]
    }
}
